﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="FBKPI.Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="head" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
    <link rel="shortcut icon" href="images/favicon_favicon.png" />
    <title>Login-KPI</title>
    <%-- <link href="<%= ResolveClientUrl("~/css/home.css") %>" rel="stylesheet" type="text/css" />--%>
    <link href="<%= ResolveClientUrl("~/Styles/home1024.css") %>" rel="stylesheet" type="text/css" />
    <link href="<%= ResolveClientUrl("~/Styles/slide.css") %>" rel="stylesheet" type="text/css" />
    <link href="<%= ResolveClientUrl("~/Styles/jquery-ui-1.8.16.custom.css") %>" rel="stylesheet"
        type="text/css" />
    <script src='<%= ResolveClientUrl("~/Scripts/jquery-1.8.2.min.js") %>' type="text/javascript"></script>
    <script src='<%= ResolveClientUrl("~/Scripts/slides.min.jquery.js") %>' type="text/javascript"></script>
    <script src='<%= ResolveClientUrl("~/Scripts/jquery.msgBox.v1.js") %>' type="text/javascript"></script>
    <script src='<%= ResolveClientUrl("~/Scripts/jquery-ui-1.8.23.min.js") %>' type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('#slides').slides({
                preload: true,
                preloadImage: '<%= ResolveClientUrl("~/images/slide/loading.gif") %>',
                play: 10000,
                pause: 2500,
                hoverPause: true,
                animationStart: function (current) {
                    $('.caption').animate({
                        bottom: -35
                    }, 100);
                    if (window.console && console.log) {
                        // example return of current slide number
                        console.log('animationStart on slide: ', current);
                    };
                },
                animationComplete: function (current) {
                    $('.caption').animate({
                        bottom: 0
                    }, 200);
                    if (window.console && console.log) {
                        // example return of current slide number
                        console.log('animationComplete on slide: ', current);
                    };
                },
                slidesLoaded: function () {
                    $('.caption').animate({
                        bottom: 0
                    }, 200);
                }
            });
        });
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#txtUserID").focus();

           

            $("#btnClear").click(function () {
                $("#txtUserID").val('');
                $("#txtPassword").val('');
                $("#txtUserID").focus();
                return false;
            });

            $("#btnLogin").click(function () {
                $.ajax({
                    "dataType": 'json',
                    "type": "POST",
                    "url": "../Serializer/LoginSerializer.ashx?Username=" + $("#txtUserID").val() + "&Password=" + $("#txtPassword").val(),
                    "success": function (data) {
                        if (data.result == 'true') {
                            //document.location = "../Home?User=" + data.data.ID;
                            document.location = "../Pages/Default.aspx";
                        }
                        else {
                            //alert('Please Enter Correct Username / Password');
                            $.msgBox("Please Enter Correct Username / Password", null, { title: "Pesan Error" });
                        }
                    },
                    "error": function (data) {
                        //alert('Login Error');
                        $.msgBox("Login Error", null, { title: "Pesan Error" });
                    }
                });
                return false;
            });
        });
    </script>
</head>
<body>
    <form id="frmLoginSlide" runat="server">
    <div class="container">
        <div class="header">
        </div>
        <div class="content">
            <div id="kiri" class="fltlft sideBarLeft">
            </div>
            <div id="tengah" class="fltlft">
                <div class="depan">
                    <div class="logo_index fltlft">
                        <img src="<%= ResolveClientUrl("~/images/favicon.png") %>" width="50" height="50"
                            alt="PT.Fastrata Buana"></div>
                    <div class="intro fltlft">
                        <h3>
                            <b>Selamat Datang</b></h3>
                        "Aplikasi KPI (Key Performance Indicator) "</div>
                    <div class="clearfloat">
                    </div>
                </div>
                <div id="slideshow">
                    <%--<img src="<%= ResolveClientUrl("~/images/slide/new-ribbon.png") %>" width="112" height="112" alt="New Ribbon" id="ribbon" />--%>
                    <div id="slides">
                        <div class="slides_container">
                            <div class="slide">
                                <img height="270" width="570" src="images/image_kpi_1.jpg" />
                            </div>
                            <div class="slide">
                                <img height="270" width="570" src="images/image_kpi_2.jpg" />
                            </div>
                            <div class="slide">
                                <img height="270" width="570" src="images/image_kpi_3.jpg" />
                            </div>
                            <div class="slide">
                                <img height="270" width="570" src="images/image_kpi_4.jpg" />
                            </div>
                            <div class="slide">
                                <img height="270" width="570" src="images/image_kpi_5.jpg" />
                            </div>
                        </div>
                        <a href="#" class="prev">
                            <img src="<%= ResolveClientUrl("~/images/slide/arrow-prev.png") %>" width="24" height="43"
                                alt="Arrow Prev" /></a> <a href="#" class="next">
                                    <img src="<%= ResolveClientUrl("~/images/slide/arrow-next.png") %>" width="24" height="43"
                                        alt="Arrow Next" /></a>
                    </div>
                    <img src="<%= ResolveClientUrl("~/images/slide/example-frame.png") %>" width="739"
                        height="341" alt="Example Frame" id="frame" />
                </div>
                <div class="login">
                    <table width="600" height="50" border="0" cellspacing="5" cellpadding="0" class="form_login">
                        <tr>
                            <td>
                                User Name :
                            </td>
                            <td>
                                <asp:TextBox ID="txtUserID" runat="server" CssClass="inputTxt"></asp:TextBox>
                            </td>
                            <td>
                                Password :
                            </td>
                            <td>
                                <asp:TextBox ID="txtPassword" MaxLength="32" TextMode="Password" runat="server" CssClass="inputTxt"></asp:TextBox>
                            </td>
                            <td>
                                <%-- <asp:Button ID="btnLogin" runat="server" Text="Masuk" CssClass="button" />--%>
                                <button type="submit" class="button" id="btnLogin">
                                    Masuk</button>
                            </td>
                        </tr>
                        <%--   <tr>
        <td>&nbsp;</td>
        <td><input name="" type="checkbox" id="chkRemember" runat="server" />Biarkan saya tetap masuk</td>
        <td></td>
        <td><a href="#">Lupa kata sandi anda?</a></td>
        <td>&nbsp;</td>
      </tr>--%>
                    </table>
                </div>
                <div class="footer">
                    2014 &copy; Hak Cipta dimiliki PT.Fastrata Buana
                    <!-- end .footer -->
                </div>
            </div>
            <div id="kanan" class="fltlft sideBarRight">
            </div>
            <!-- end .content -->
        </div>
        <!-- end .container -->
    </div>
    </form>
</body>
</html>

